import request from '@/utils/request'

// 查询爬虫记录列表
export function listWebCrawler(query) {
  return request({
    url: '/crawler/webCrawler/list',
    method: 'get',
    params: query
  })
}

// 查询爬虫记录详细
export function getWebCrawler(id) {
  return request({
    url: '/crawler/webCrawler/' + id,
    method: 'get'
  })
}

// 新增爬虫记录
export function addWebCrawler(data) {
  return request({
    url: '/crawler/webCrawler',
    method: 'post',
    data: data
  })
}

// 修改爬虫记录
export function updateWebCrawler(data) {
  return request({
    url: '/crawler/webCrawler',
    method: 'put',
    data: data
  })
}

// 删除爬虫记录
export function delWebCrawler(id) {
  return request({
    url: '/crawler/webCrawler/' + id,
    method: 'delete'
  })
}

// H5解析
export function h5Crawler(data) {
  return request({
    url: '/crawler/webCrawler/h5Crawler',
    method: 'post',
    data: data
  })
}